package com.beerandjesus.sportofkings.handicapper.dao;

import com.beerandjesus.sportofkings.handicapper.model.TurfSire;
import com.beerandjesus.sportofkings.handicapper.model.JockeyRating;

import java.sql.Connection;
import java.util.List;

/**
 * Date: Jun 7, 2012
 * Time: 6:21:51 PM
 */
public interface JockeyDAO {

    /**
     * Build (or rebuild) the jockey database from scratch
     * @throws com.beerandjesus.sportofkings.handicapper.dao.DAOException
     */
    void buildDatabase() throws DAOException;

    /**
     * Get a count of rows in the jockey database
     * @throws com.beerandjesus.sportofkings.handicapper.dao.DAOException
     * @return int The row count
     */
    int getRowCount() throws DAOException;

    /**
     * Get a jockey rating record by name
     * @param name
     * @return
     * @throws com.beerandjesus.sportofkings.handicapper.dao.DAOException
     */
    JockeyRating getJockeyRatingByName(String name) throws DAOException;

    /**
     * Save a jockey rating
     * @param rating
     */
    void save(JockeyRating rating) throws DAOException;

}
